﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using libtcod;

namespace Threshold.MapGenerators
{
	class DungeonGenerator : IMapGenerator
	{
		private Map _map = null;

		public Map Generate(int width, int height)
		{
			_map = new Map(width, height);

			Dig(10, 20, 10, 20);
			
			return _map;
		}

		private void Dig(int top, int left, int width, int height)
		{
			TCODColor floorColor = TCODColor.grey;
			TCODColor wallColor = new TCODColor(92, 64, 51);

			int floorCharacter = 32;

			bool isTransparent = true;
			bool isWalkable = true;
			bool isExplored = false;

			for (int x = top; x < top + width; x++)
			{
				for (int y = left; y < left + width; y++)
				{
					_map.SetData(x, y, floorCharacter, wallColor, floorColor, isTransparent, isWalkable, isExplored); 
				}
			}

		}

	}
}
